import request from '@/utils/request'

// 分页
export function getPage(params) {
  return request({
    url: `/taskManagement/page`,
    method: 'get',
    params
  })
}
// 保存、修改
export function saveOrUpdateTask(data) {
  return request({
    url: `/taskManagement/saveOrUpdate`,
    method: 'post',
    data
  })
}
// 详情
export function getById(id) {
  return request({
    url: `/taskManagement/getById?id=${id}`,
    method: 'get'
  })
}
// 删除
export function deleteById(id) {
  return request({
    url: `/taskManagement/deleteById?id=${id}`,
    method: 'get'
  })
}
// 设为当前任务
export function currentTaskById(id) {
  return request({
    url: `/taskManagement/currentTaskById?id=${id}`,
    method: 'get'
  })
}
// 地震影响场数据源
export function influenceField(params) {
  return request({
    url: `/lifelineData/influenceField`,
    method: 'get',
    params
  })
}